package io.github.wjehovah.yyn.utils;


import io.github.wjehovah.yyn.App;

/**
 * Created by wuyong on 15/7/24.
 */
public class DimensionUtil {
    public static int dp2px(float dpValue) {
        final float scale = App.getContext().getResources().getDisplayMetrics().density;
        return (int) (dpValue * scale + 0.5f);
    }
}
